package javaweb_work01.classesContrl.Service;

import javaweb_work01.classesContrl.Dao.StudentsSumDao;
import javaweb_work01.classesContrl.Factory.ClassesFactory;

public class StudentsSumService {
    //合成复用原则
    private StudentsSumDao studentsSumDao;

    public StudentsSumService(){
        this.studentsSumDao = ClassesFactory.getStudentsSumDao();
    }

    /**
     * 自定义成员方法得到班级总数
     * @param cid
     * @return
     */
    public int studentsSumService(int cid){
        return studentsSumDao.StudentsSum(cid);
    }
}
